@using Rail.Net.Core.Model
@model Relation

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Relation</legend>

    <div class="display-label">RelationNumber</div>
    <div class="display-field">@Model.RelationNumber</div>

    <div class="display-label">Route</div>
    <div class="display-field">@Model.Route</div>

    <div class="display-label">ValidFrom</div>
    <div class="display-field">@String.Format("{0:g}", Model.ValidFrom)</div>

    <div class="display-label">ValidTo</div>
    <div class="display-field">@String.Format("{0:g}", Model.ValidTo)</div>

    <div class="display-label">BorderStation</div>
    <div class="display-field">@Model.BorderStation</div>

    <div class="display-label">DestinationStation</div>
    <div class="display-field">@Model.DestinationStation</div>

    <div class="display-label">RelationRus</div>
    <div class="display-field">@(Model.RelationRus == null ? "None" : Model.RelationRus.Count.ToString())</div>

    <div class="display-label">Descriptions</div>
    <div class="display-field">@(Model.Descriptions == null ? "None" : Model.Descriptions.Count.ToString())</div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>


